package cn.edu.hust.sse.software7.class3.entities;

import java.io.Serializable;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Blob;

/**
 * This is the entities of the product informations. We can add product
 * information or change the information of a product and search for the curious
 * project.
 * 
 * @author mason
 * 
 */
@PersistenceCapable(identityType=IdentityType.APPLICATION)
public class EBProduct implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Long productId;
	@Persistent
	private String productName;
	@Persistent
	private String productDescription;
	@Persistent
	private Long myCategoryId;
	@Persistent
	private Blob productImage;
	@Persistent
	private Float lowestPrice;
	@Persistent
	private Integer mount;
	@Persistent
	private Float freight;
	@Persistent
	private Float hightestBid;
	@Persistent
	private Float tradingPrice;

	public EBProduct(String productName, String productDescription,
			Long myCategoryId, Blob productImage, Float lowestPrice,
			Integer mount, Float freight, Float tradingPrice) {
		super();
		this.productName = productName;
		this.productDescription = productDescription;
		this.myCategoryId = myCategoryId;
		this.productImage = productImage;
		this.lowestPrice = lowestPrice;
		this.mount = mount;
		this.freight = freight;
		this.tradingPrice = tradingPrice;
	}

	public String getProductName() {
		return productName;
	}

	public void setProductName(String productName) {
		this.productName = productName;
	}

	public String getProductDescription() {
		return productDescription;
	}

	public void setProductDescription(String productDescription) {
		this.productDescription = productDescription;
	}

	public Blob getProductImage() {
		return productImage;
	}

	public void setProductImage(Blob productImage) {
		this.productImage = productImage;
	}

	public Float getLowestPrice() {
		return lowestPrice;
	}

	public void setLowestPrice(Float lowestPrice) {
		this.lowestPrice = lowestPrice;
	}

	public Integer getMount() {
		return mount;
	}

	public void setMount(Integer mount) {
		this.mount = mount;
	}

	public Float getFreight() {
		return freight;
	}

	public void setFreight(Float freight) {
		this.freight = freight;
	}

	public Float getHightestBid() {
		return hightestBid;
	}

	public void setHightestBid(Float hightestBid) {
		this.hightestBid = hightestBid;
	}

	public Float getTradingPrice() {
		return tradingPrice;
	}

	public void setTradingPrice(Float tradingPrice) {
		this.tradingPrice = tradingPrice;
	}

	public Long getProductId() {
		return productId;
	}

	public Long getMyCategoryId() {
		return myCategoryId;
	}

	public void setMyCategoryId(Long myCategoryId) {
		this.myCategoryId = myCategoryId;
	}

}
